package com.wk.pms.feign;

import com.wk.common.bean.QueryCondition;
import com.wk.common.bean.Resp;
import com.wk.pms.entity.SpuInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("pms-service")
@RequestMapping("spuinfo")
public interface SpuInfoFeign {

    /**
     * 根据ID查询spu信息
     * @param id
     * @return
     */
    @GetMapping("/info/{id}")
    Resp<SpuInfo> querySpuById(@PathVariable("id") Long id);

    /**
     * 分页查询
     */
    @PostMapping("page")
    Resp<List<SpuInfo>> page(@RequestBody QueryCondition queryCondition);
}
